public class Rectangle {
	double length, width;
	
	Rectangle(Point p1, Point p2) {
		length = (p2.x - p1.x);
		width = (p2.y - p1.y);
	}
	
	public Double getArea() {
		return Math.abs(length * width);
	}
	
	public Double getDiagonal() {
		return Math.sqrt(Math.pow(length, 2) + Math.pow(width, 2));
	}
	

}